package util.evaluation;

import java.util.ArrayList;

public  class StatUnit{
	
	
	public int matches=0;
	public int total=0;
	public int total_queries=0;
	
	
	public ArrayList<Integer> ranks = new ArrayList<Integer>();
	
	
	
	public float precision_relaxed(){
		
		return (float)matches/(float)total;
		
	}
	
	public float precision_relaxed(float at){
		
		return (float)matches/(float)(total);
		
	}
	
	//this need to be changed at some point
	public float precision(){
		
		return (float)matches/(float)total_queries;
		
	}
	
	public float rankAverage(){
		float total=0f;
		
		for(int i =0; i< ranks.size(); i++){
			
			total = total + ranks.get(i);
			
		}
		
		return total/(float)ranks.size();
		
	}
	}